3.696 \(\int \frac {a+b \sin (x)}{(b+a \sin (x))^2} \, dx\)

Optimal. Leaf size=12 \[ -\frac {\cos (x)}{a \sin (x)+b} \]

[Out]

-cos(x)/(b+a*sin(x))

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 12, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {2754, 8} \[ -\frac {\cos (x)}{a \sin (x)+b} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sin[x])/(b + a*Sin[x])^2,x]

[Out]

-(Cos[x]/(b + a*Sin[x]))

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2754

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[((
b*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(f*(m + 1)*(a^2 - b^2)), x] + Dist[1/((m + 1)*(a^2 - b^2
)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[(a*c - b*d)*(m + 1) - (b*c - a*d)*(m + 2)*Sin[e + f*x], x], x], x] /
; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]

Rubi steps

\begin {align*} \int \frac {a+b \sin (x)}{(b+a \sin (x))^2} \, dx &=-\frac {\cos (x)}{b+a \sin (x)}+\frac {\int 0 \, dx}{a^2-b^2}\\ &=-\frac {\cos (x)}{b+a \sin (x)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 12, normalized size = 1.00 \[ -\frac {\cos (x)}{a \sin (x)+b} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sin[x])/(b + a*Sin[x])^2,x]

[Out]

-(Cos[x]/(b + a*Sin[x]))

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 12, normalized size = 1.00 \[ -\frac {\cos \relax (x)}{a \sin \relax (x) + b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(x))/(b+a*sin(x))^2,x, algorithm="fricas")

[Out]

-cos(x)/(a*sin(x) + b)

________________________________________________________________________________________

giac [B]  time = 0.29, size = 32, normalized size = 2.67 \[ -\frac {2 \, {\left (a \tan \left (\frac {1}{2} \, x\right ) + b\right )}}{{\left (b \tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, a \tan \left (\frac {1}{2} \, x\right ) + b\right )} b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(x))/(b+a*sin(x))^2,x, algorithm="giac")

[Out]

-2*(a*tan(1/2*x) + b)/((b*tan(1/2*x)^2 + 2*a*tan(1/2*x) + b)*b)

________________________________________________________________________________________

maple [B]  time = 0.11, size = 34, normalized size = 2.83 \[ \frac {-\frac {2 a \tan \left (\frac {x}{2}\right )}{b}-2}{\left (\tan ^{2}\left (\frac {x}{2}\right )\right ) b +2 a \tan \left (\frac {x}{2}\right )+b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sin(x))/(b+a*sin(x))^2,x)

[Out]

2*(-a/b*tan(1/2*x)-1)/(tan(1/2*x)^2*b+2*a*tan(1/2*x)+b)

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(x))/(b+a*sin(x))^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?`
 for more details)Is 4*a^2-4*b^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 7.87, size = 24, normalized size = 2.00 \[ -\frac {a\,\sin \relax (x)+b\,\left (\cos \relax (x)+1\right )}{b\,\left (b+a\,\sin \relax (x)\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(x))/(b + a*sin(x))^2,x)

[Out]

-(a*sin(x) + b*(cos(x) + 1))/(b*(b + a*sin(x)))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(x))/(b+a*sin(x))**2,x)

[Out]

Timed out

________________________________________________________________________________________